<?	require_once E.'_lib/_specific.php';

//*** some parameters

define('PERMANENT_SESSION',	false);	// create session on start or on login

define('SUPPORT_FLV',	false);			// include FLV support lib
define('USE_LOG4', false);					// enable logging
define('USE_MEMCACHED', false);			// use memcached
define('MC_PREFIX', 'empty.');
define('USE_HTTPS', false);

// page tag bits

define('PT_ADMINABLE',	0x0001);	// visible in admin sitemap
define('PT_EDITABLE',	0x0002);	// has edit page in admin
define('PT_MAPABLE',		0x0004);	// visible in user sitemap
define('PT_ISUSER',		0x0008);	// need to be a user to view this page
define('PT_ISADMIN',		0x0010);	// need to be an admin to view this page
define('PT_MAIN',			0x0020);	// custom attr - used to check if additional blocks are need to be shown
define('PT_CONFIGURABLE',	0x0100);	// this page is a part of editable structure
define('PT_NODE',				0x0200);	// this page can have descendants
define('PT_SPECIAL',			0x0400);	// this page has special template
define('PT_LOCKED',			0x0800);	// this page has special keyword & visibility

define('PTC_1',			0x1000);	// for custom filtering
define('PTC_2',			0x2000);	// for custom filtering
define('PTC_3',			0x4000);	// for custom filtering
define('PTC_4',			0x8000);	// for custom filtering

define('PTC_NUM',		4);	// for custom filtering
define('PTC_SHIFT',	12);	// for custom filtering
define('PTC_MASK',	0xf000);	// for custom filtering


// page kind

define('PK_NORMAL',		0);	// normal page
define('PK_REDIRECT',	1);	// redirect to other page
define('PK_NOTFOUND',	2);	// page not found (generates by engine)
define('PK_XML',		0x10);	// XML content type

define('PK_NOTFOUND_TEMPLATE',	'main/404');		// page not found template
define('PK_LOGIN_TEMPLATE',		'main/login');		// login page template
define('PK_NODB_TEMPLATE',			'main/nodb');		// 'database inaccessible' template


// lists

define('L_LANGS',			1);	//	languages of site
define('L_PAGENAMES',	2);	//	names of pages
define('L_BLOCK',			3);
define('L_PAGEMETA',		4);	//	common page metadata properties
define('L_FORM_ELEMENTS',7);	

define('L_SEC_OBJ',		8);	// security objects list
define('L_SEC_ROLE',		9);	// user roles list


// data

define('D_META',			1);	//	Page metadata
define('D_ARTICLE',		2);	//	Article data
define('D_LANG',			3);	//	Language data
define('D_BLOCK',			4);	//	Block data
define('D_MAIN',			5);	//	Main page data
define('D_CACHE',			6);	//	cache

define('D_SEC_ROLE',		9);	// role acl assignment

define('D_PAGENAMES',	10);	// Page names for structure editor & crumbing
define('D_SITEWIDE',		11);	// some sitewide data, like project name in different languages

define('D_FORM',			12);	// form fields names
define('D_MULTIBLOCK',	13);	// blocks definition
define('D_MB_SETTINGS',	14);	// blocks settings
define('D_MB_DATA',		15);	// blocks data
define('D_MB_META',		16);	// blocks meta
define('D_MB_STORAGE',	17);	// blocks additional data storage

define('D_GALLERY_DATA',20);	// gallery2 image data keyed by path


define('D_MENU',			30);

define('L_SERVICE',		21);	
define('D_SERVICE',		21);

define('L_TAGLISTS',		50);
define('X_TAGLISTS',		50);
define('D_TAGLISTS',		50);


define('IS_VIDEO_X', 700);
define('IS_VIDEO_Y', 505);

define('IS_MAIN_X', 570);
define('IS_MAIN_Y', 415);
define('IS_MAIN_TN_X', 128);
define('IS_MAIN_TN_Y', 93);

define('IS_ARTICLE_X', 300);
define('IS_ARTICLE_Y', 0);

define('IS_ANONS_X', 100);
define('IS_ANONS_Y', 100);


define('IS_CAT_SM_X', 170);
define('IS_CAT_SM_Y', 80);

define('IS_CAT_X', 900);
define('IS_CAT_Y', 0);

define('IS_CAT_L_X', 800);
define('IS_CAT_L_Y', 800);



define('IS_SERVICE_X', 209);
define('IS_SERVICE_Y', 185);


define('IS_TN_X', 128);
define('IS_TN_Y', 96);


$MEDIA_TYPES = array(1 => 'gif', 2 => 'jpg', 3 => 'png' );
$DENIED_EXT = array('php','php3','php4','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi', 'sh', 'py','asa','asax','config','com','inc');


// article attributes

define('AA_VISIBLE',		0x0001);
define('AA_SELECTABLE',	0x0002);
define('AA_LANG_DEPENDENT',	0x0004);

define('AA_UNSEEN', 0x1000);

// component attributes

define('COM_VISIBLE',		0x0001);
define('COM_ENABLED',		0x0002);
define('COM_GLOBAL',			0x0004);	// actually needs only for the interface settings storage

define('COM_DEF_FILTER', 0);
define('COM_DEF_MASK', COM_VISIBLE | COM_ENABLED | COM_GLOBAL);

define('COM_DEF_TAGNAME', '_default');


// user attributes

define('U_ENABLED',		0x0001);

// role attributes

define('RO_DEFAULT',		0x0001);

// data access mapping

$AC_MAP = array(
	'see-unseen' => array('present' => '', 'absent' => ' AND (!field & '.AA_UNSEEN.' = 0)'),
//	'see-unseen' => array('present' => '', 'absent' => ' AND (!field & '.AA_UNSEEN.' = 0)'),
);


// language attributes

define('LL_ACTIVE',		0x0001);
define('LL_DEFAULT',		0x0002);
define('LL_ADMIN',		0x0004);
define('LL_CORE',			0x0008);


// filesystem places

define('FP_COMPONENT_PATH',		'/_plugins/');							// root of all components
define('FP_COMPONENT_STUB',		FP_COMPONENT_PATH.'stub.php');	// includes if no such component found

define('FP_UPLOAD_PATH',			'/files/');								// root of all uploads

define('FP_TN_DIR',	'tn/');

// some

define('PASS_CHARS',	'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-*');
define('PASS_LENGTH',	8);
